Menu Events Sample Script version 1.1.1 — an AWOL Software Production © 1994 Ross Brown
This script prompts for the name of an application, which can be any application that supports program linking (Apple events).
It finds the File menu, says which of its entries are enabled, then selects the Quit item to quit the application.
This script requires the Menu Events system extension and Menu Events Scripting Addition.